// source --> https://nexoinmobiliaria.com.pe/wp-includes/js/jquery/jquery.min.js?ver=3.6.1 /*! jQuery v3.6.1 | (c) OpenJS Foundation and other contributors | jquery.org/license */ !function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],r=Object.getPrototypeOf,s=t.slice,g=t.flat?function(e){return t.flat.call(e)}:function(e){return t.concat.apply([],e)},u=t.push,i=t.indexOf,n={},o=n.toString,y=n.hasOwnProperty,a=y.toString,l=a.call(Object),v={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},x=function(e){return null!=e&&e===e.window},E=C.document,c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.6.1",S=function(e,t){return new S.fn.init(e,t)};function p(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp(F),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(p.childNodes),p.childNodes),t[p.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&v(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!N[t+" "]&&(!y||!y.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&(U.test(t)||z.test(t))){(f=ee.test(t)&&ve(e.parentNode)||e)===e&&d.scope||((s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=S)),o=(l=h(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+xe(l[o]);c=l.join(",")}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){N(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return g(t.replace(B,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[S]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ye(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ve(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:p;return r!=C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),p!=C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.scope=ce(function(e){return a.appendChild(e).appendChild(C.createElement("div")),"undefined"!=typeof e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=S,!C.getElementsByName||!C.getElementsByName(S).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],y=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){var t;a.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&y.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||y.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+S+"-]").length||y.push("~="),(t=C.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||y.push("\\["+M+"*name"+M+"*="+M+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||y.push(":checked"),e.querySelectorAll("a#"+S+"+*").length||y.push(".#.+[+~]"),e.querySelectorAll("\\\f"),y.push("[\\r\\n\\f]")}),ce(function(e){e.innerHTML="";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&y.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&y.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&y.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),y.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",F)}),y=y.length&&new RegExp(y.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),v=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},j=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e==C||e.ownerDocument==p&&v(p,e)?-1:t==C||t.ownerDocument==p&&v(p,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==C?-1:t==C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]==p?-1:s[r]==p?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(T(e),d.matchesSelector&&E&&!N[t+" "]&&(!s||!s.test(t))&&(!y||!y.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){N(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=m[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&m(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,n,r){return m(n)?S.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?S.grep(e,function(e){return e===n!==r}):"string"!=typeof n?S.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(S.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||D,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:q.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof S?t[0]:t,S.merge(this,S.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),N.test(r[1])&&S.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(S):S.makeArray(e,this)}).prototype=S.fn,D=S(E);var L=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function O(e,t){while((e=e[t])&&1!==e.nodeType);return e}S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i;ce=E.createDocumentFragment().appendChild(E.createElement("div")),(fe=E.createElement("input")).setAttribute("type","radio"),fe.setAttribute("checked","checked"),fe.setAttribute("name","t"),ce.appendChild(fe),v.checkClone=ce.cloneNode(!0).cloneNode(!0).lastChild.checked,ce.innerHTML="",v.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue,ce.innerHTML="",v.option=!!ce.lastChild;var ge={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function ye(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?S.merge([e],n):n}function ve(e,t){for(var n=0,r=e.length;n",""]);var me=/<|&#?\w+;/;function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d\s*$/g;function je(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function De(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function qe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Le(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events))for(i in Y.remove(t,"handle events"),s)for(n=0,r=s[i].length;n").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var Ut,Xt=[],Vt=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Xt.pop()||S.expando+"_"+Ct.guid++;return this[e]=!0,e}}),S.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Vt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Vt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Vt,"$1"+r):!1!==e.jsonp&&(e.url+=(Et.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||S.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?S(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Xt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),v.createHTMLDocument=((Ut=E.implementation.createHTMLDocument("").body).innerHTML="
",2===Ut.childNodes.length),S.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(v.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=N.exec(e))?[t.createElement(i[1])]:(i=xe([e],t,o),o&&o.length&&S(o).remove(),S.merge([],i.childNodes)));var r,i,o},S.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(S.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},S.expr.pseudos.animated=function(t){return S.grep(S.timers,function(e){return t===e.elem}).length},S.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=S.css(e,"position"),c=S(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=S.css(e,"top"),u=S.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,S.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},S.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){S.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===S.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===S.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=S(e).offset()).top+=S.css(e,"borderTopWidth",!0),i.left+=S.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-S.css(r,"marginTop",!0),left:t.left-i.left-S.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===S.css(e,"position"))e=e.offsetParent;return e||re})}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;S.fn[t]=function(e){return B(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),S.each(["top","left"],function(e,n){S.cssHooks[n]=_e(v.pixelPosition,function(e,t){if(t)return t=Be(e,n),Pe.test(t)?S(e).position()[n]+"px":t})}),S.each({Height:"height",Width:"width"},function(a,s){S.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){S.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return B(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?S.css(e,t,i):S.style(e,t,n,i)},s,n?e:void 0,n)}})}),S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){S.fn[t]=function(e){return this.on(t,e)}}),S.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),S.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){S.fn[n]=function(e,t){return 0 https://nexoinmobiliaria.com.pe/wp-includes/js/jquery/jquery-migrate.min.js?ver=1.4.1 /*! jQuery Migrate v1.4.1 | (c) jQuery Foundation and other contributors | jquery.org/license */ "undefined"==typeof jQuery.migrateMute&&(jQuery.migrateMute=!0),function(a,b,c){function d(c){var d=b.console;f[c]||(f[c]=!0,a.migrateWarnings.push(c),d&&d.warn&&!a.migrateMute&&(d.warn("JQMIGRATE: "+c),a.migrateTrace&&d.trace&&d.trace()))}function e(b,c,e,f){if(Object.defineProperty)try{return void Object.defineProperty(b,c,{configurable:!0,enumerable:!0,get:function(){return d(f),e},set:function(a){d(f),e=a}})}catch(g){}a._definePropertyBroken=!0,b[c]=e}a.migrateVersion="1.4.1";var f={};a.migrateWarnings=[],b.console&&b.console.log&&b.console.log("JQMIGRATE: Migrate is installed"+(a.migrateMute?"":" with logging active")+", version "+a.migrateVersion),a.migrateTrace===c&&(a.migrateTrace=!0),a.migrateReset=function(){f={},a.migrateWarnings.length=0},"BackCompat"===document.compatMode&&d("jQuery is not compatible with Quirks Mode");var g=a("",{size:1}).attr("size")&&a.attrFn,h=a.attr,i=a.attrHooks.value&&a.attrHooks.value.get||function(){return null},j=a.attrHooks.value&&a.attrHooks.value.set||function(){return c},k=/^(?:input|button)$/i,l=/^[238]$/,m=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,n=/^(?:checked|selected)$/i;e(a,"attrFn",g||{},"jQuery.attrFn is deprecated"),a.attr=function(b,e,f,i){var j=e.toLowerCase(),o=b&&b.nodeType;return i&&(h.length<4&&d("jQuery.fn.attr( props, pass ) is deprecated"),b&&!l.test(o)&&(g?e in g:a.isFunction(a.fn[e])))?a(b)[e](f):("type"===e&&f!==c&&k.test(b.nodeName)&&b.parentNode&&d("Can't change the 'type' of an input or button in IE 6/7/8"),!a.attrHooks[j]&&m.test(j)&&(a.attrHooks[j]={get:function(b,d){var e,f=a.prop(b,d);return f===!0||"boolean"!=typeof f&&(e=b.getAttributeNode(d))&&e.nodeValue!==!1?d.toLowerCase():c},set:function(b,c,d){var e;return c===!1?a.removeAttr(b,d):(e=a.propFix[d]||d,e in b&&(b[e]=!0),b.setAttribute(d,d.toLowerCase())),d}},n.test(j)&&d("jQuery.fn.attr('"+j+"') might use property instead of attribute")),h.call(a,b,e,f))},a.attrHooks.value={get:function(a,b){var c=(a.nodeName||"").toLowerCase();return"button"===c?i.apply(this,arguments):("input"!==c&&"option"!==c&&d("jQuery.fn.attr('value') no longer gets properties"),b in a?a.value:null)},set:function(a,b){var c=(a.nodeName||"").toLowerCase();return"button"===c?j.apply(this,arguments):("input"!==c&&"option"!==c&&d("jQuery.fn.attr('value', val) no longer sets properties"),void(a.value=b))}};var o,p,q=a.fn.init,r=a.find,s=a.parseJSON,t=/^\s*)([^>]*)$/;a.fn.init=function(b,e,f){var g,h;return b&&"string"==typeof b&&!a.isPlainObject(e)&&(g=w.exec(a.trim(b)))&&g[0]&&(t.test(b)||d("$(html) HTML strings must start with '<' character"),g[3]&&d("$(html) HTML text after last tag is ignored"),"#"===g[0].charAt(0)&&(d("HTML string cannot start with a '#' character"),a.error("JQMIGRATE: Invalid selector string (XSS)")),e&&e.context&&e.context.nodeType&&(e=e.context),a.parseHTML)?q.call(this,a.parseHTML(g[2],e&&e.ownerDocument||e||document,!0),e,f):(h=q.apply(this,arguments),b&&b.selector!==c?(h.selector=b.selector,h.context=b.context):(h.selector="string"==typeof b?b:"",b&&(h.context=b.nodeType?b:e||document)),h)},a.fn.init.prototype=a.fn,a.find=function(a){var b=Array.prototype.slice.call(arguments);if("string"==typeof a&&u.test(a))try{document.querySelector(a)}catch(c){a=a.replace(v,function(a,b,c,d){return"["+b+c+'"'+d+'"]'});try{document.querySelector(a),d("Attribute selector with '#' must be quoted: "+b[0]),b[0]=a}catch(e){d("Attribute selector with '#' was not fixed: "+b[0])}}return r.apply(this,b)};var x;for(x in r)Object.prototype.hasOwnProperty.call(r,x)&&(a.find[x]=r[x]);a.parseJSON=function(a){return a?s.apply(this,arguments):(d("jQuery.parseJSON requires a valid JSON string"),null)},a.uaMatch=function(a){a=a.toLowerCase();var b=/(chrome)[ \/]([\w.]+)/.exec(a)||/(webkit)[ \/]([\w.]+)/.exec(a)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(a)||/(msie) ([\w.]+)/.exec(a)||a.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(a)||[];return{browser:b[1]||"",version:b[2]||"0"}},a.browser||(o=a.uaMatch(navigator.userAgent),p={},o.browser&&(p[o.browser]=!0,p.version=o.version),p.chrome?p.webkit=!0:p.webkit&&(p.safari=!0),a.browser=p),e(a,"browser",a.browser,"jQuery.browser is deprecated"),a.boxModel=a.support.boxModel="CSS1Compat"===document.compatMode,e(a,"boxModel",a.boxModel,"jQuery.boxModel is deprecated"),e(a.support,"boxModel",a.support.boxModel,"jQuery.support.boxModel is deprecated"),a.sub=function(){function b(a,c){return new b.fn.init(a,c)}a.extend(!0,b,this),b.superclass=this,b.fn=b.prototype=this(),b.fn.constructor=b,b.sub=this.sub,b.fn.init=function(d,e){var f=a.fn.init.call(this,d,e,c);return f instanceof b?f:b(f)},b.fn.init.prototype=b.fn;var c=b(document);return d("jQuery.sub() is deprecated"),b},a.fn.size=function(){return d("jQuery.fn.size() is deprecated; use the .length property"),this.length};var y=!1;a.swap&&a.each(["height","width","reliableMarginRight"],function(b,c){var d=a.cssHooks[c]&&a.cssHooks[c].get;d&&(a.cssHooks[c].get=function(){var a;return y=!0,a=d.apply(this,arguments),y=!1,a})}),a.swap=function(a,b,c,e){var f,g,h={};y||d("jQuery.swap() is undocumented and deprecated");for(g in b)h[g]=a.style[g],a.style[g]=b[g];f=c.apply(a,e||[]);for(g in b)a.style[g]=h[g];return f},a.ajaxSetup({converters:{"text json":a.parseJSON}});var z=a.fn.data;a.fn.data=function(b){var e,f,g=this[0];return!g||"events"!==b||1!==arguments.length||(e=a.data(g,b),f=a._data(g,b),e!==c&&e!==f||f===c)?z.apply(this,arguments):(d("Use of jQuery.fn.data('events') is deprecated"),f)};var A=/\/(java|ecma)script/i;a.clean||(a.clean=function(b,c,e,f){c=c||document,c=!c.nodeType&&c[0]||c,c=c.ownerDocument||c,d("jQuery.clean() is deprecated");var g,h,i,j,k=[];if(a.merge(k,a.buildFragment(b,c).childNodes),e)for(i=function(a){return!a.type||A.test(a.type)?f?f.push(a.parentNode?a.parentNode.removeChild(a):a):e.appendChild(a):void 0},g=0;null!=(h=k[g]);g++)a.nodeName(h,"script")&&i(h)||(e.appendChild(h),"undefined"!=typeof h.getElementsByTagName&&(j=a.grep(a.merge([],h.getElementsByTagName("script")),i),k.splice.apply(k,[g+1,0].concat(j)),g+=j.length));return k});var B=a.event.add,C=a.event.remove,D=a.event.trigger,E=a.fn.toggle,F=a.fn.live,G=a.fn.die,H=a.fn.load,I="ajaxStart|ajaxStop|ajaxSend|ajaxComplete|ajaxError|ajaxSuccess",J=new RegExp("\\b(?:"+I+")\\b"),K=/(?:^|\s)hover(\.\S+|)\b/,L=function(b){return"string"!=typeof b||a.event.special.hover?b:(K.test(b)&&d("'hover' pseudo-event is deprecated, use 'mouseenter mouseleave'"),b&&b.replace(K,"mouseenter$1 mouseleave$1"))};a.event.props&&"attrChange"!==a.event.props[0]&&a.event.props.unshift("attrChange","attrName","relatedNode","srcElement"),a.event.dispatch&&e(a.event,"handle",a.event.dispatch,"jQuery.event.handle is undocumented and deprecated"),a.event.add=function(a,b,c,e,f){a!==document&&J.test(b)&&d("AJAX events should be attached to document: "+b),B.call(this,a,L(b||""),c,e,f)},a.event.remove=function(a,b,c,d,e){C.call(this,a,L(b)||"",c,d,e)},a.each(["load","unload","error"],function(b,c){a.fn[c]=function(){var a=Array.prototype.slice.call(arguments,0);return"load"===c&&"string"==typeof a[0]?H.apply(this,a):(d("jQuery.fn."+c+"() is deprecated"),a.splice(0,0,c),arguments.length?this.bind.apply(this,a):(this.triggerHandler.apply(this,a),this))}}),a.fn.toggle=function(b,c){if(!a.isFunction(b)||!a.isFunction(c))return E.apply(this,arguments);d("jQuery.fn.toggle(handler, handler...) is deprecated");var e=arguments,f=b.guid||a.guid++,g=0,h=function(c){var d=(a._data(this,"lastToggle"+b.guid)||0)%g;return a._data(this,"lastToggle"+b.guid,d+1),c.preventDefault(),e[d].apply(this,arguments)||!1};for(h.guid=f;g https://nexoinmobiliaria.com.pe/wp-content/plugins/ecommerce-product-catalog/js/magnifier/magnifier.js?ver=5.0.2 /* * jQuery elevateZoom 3.0.8 * Demo's and documentation: * www.elevateweb.co.uk/image-zoom * * Copyright (c) 2012 Andrew Eades * www.elevateweb.co.uk * * Dual licensed under the GPL and MIT licenses. * http://en.wikipedia.org/wiki/MIT_License * http://en.wikipedia.org/wiki/GNU_General_Public_License * /* * jQuery elevateZoom 3.0.3 * Demo's and documentation: * www.elevateweb.co.uk/image-zoom * * Copyright (c) 2012 Andrew Eades * www.elevateweb.co.uk * * Dual licensed under the GPL and MIT licenses. * http://en.wikipedia.org/wiki/MIT_License * http://en.wikipedia.org/wiki/GNU_General_Public_License */ if ( typeof Object.create !== 'function' ) { Object.create = function ( obj ) { function F() {} ; F.prototype = obj; return new F(); }; } ( function ( $, window, document, undefined ) { var ElevateZoom = { init: function ( options, elem ) { var self = this; self.elem = elem; self.$elem = $( elem ); self.imageSrc = self.$elem.data( "zoom-image" ) ? self.$elem.data( "zoom-image" ) : self.$elem.attr( "src" ); self.options = $.extend( { }, $.fn.elevateZoom.options, options ); //TINT OVERRIDE SETTINGS if ( self.options.tint ) { self.options.lensColour = "none", //colour of the lens background self.options.lensOpacity = "1" //opacity of the lens } //INNER OVERRIDE SETTINGS if ( self.options.zoomType == "inner" ) { self.options.showLens = false; } //Remove alt on hover self.$elem.parent().removeAttr( 'title' ).removeAttr( 'alt' ); self.zoomImage = self.imageSrc; self.refresh( 1 ); //Create the image swap from the gallery $( '#' + self.options.gallery + ' a' ).click( function ( e ) { //Set a class on the currently active gallery image if ( self.options.galleryActiveClass ) { $( '#' + self.options.gallery + ' a' ).removeClass( self.options.galleryActiveClass ); $( this ).addClass( self.options.galleryActiveClass ); } //stop any link on the a tag from working e.preventDefault(); //call the swap image function if ( $( this ).data( "zoom-image" ) ) { self.zoomImagePre = $( this ).data( "zoom-image" ) } else { self.zoomImagePre = $( this ).data( "image" ); } self.swaptheimage( $( this ).data( "image" ), self.zoomImagePre ); return false; } ); }, refresh: function ( length ) { var self = this; setTimeout( function () { self.fetch( self.imageSrc ); }, length || self.options.refresh ); }, fetch: function ( imgsrc ) { //get the image var self = this; var newImg = new Image(); newImg.onload = function () { //set the large image dimensions - used to calculte ratio's self.largeWidth = newImg.width; self.largeHeight = newImg.height; //once image is loaded start the calls self.startZoom(); self.currentImage = self.imageSrc; //let caller know image has been loaded self.options.onZoomedImageLoaded( self.$elem ); } newImg.src = imgsrc; // this must be done AFTER setting onload return; }, startZoom: function ( ) { var self = this; //get dimensions of the non zoomed image self.nzWidth = self.$elem.width(); self.nzHeight = self.$elem.height(); //activated elements self.isWindowActive = false; self.isLensActive = false; self.isTintActive = false; self.overWindow = false; //CrossFade Wrappe if ( self.options.imageCrossfade ) { self.zoomWrap = self.$elem.wrap( '
' ); self.$elem.css( 'position', 'absolute' ); } self.zoomLock = 1; self.scrollingLock = false; self.changeBgSize = false; self.currentZoomLevel = self.options.zoomLevel; //get offset of the non zoomed image self.nzOffset = self.$elem.offset(); //calculate the width ratio of the large/small image self.widthRatio = ( self.largeWidth / self.currentZoomLevel ) / self.nzWidth; self.heightRatio = ( self.largeHeight / self.currentZoomLevel ) / self.nzHeight; //if window zoom if ( self.options.zoomType == "window" ) { self.zoomWindowStyle = "overflow: hidden;" + "background-position: 0px 0px;text-align:center;" + "background-color: " + String( self.options.zoomWindowBgColour ) + ";width: " + String( self.options.zoomWindowWidth ) + "px;" + "height: " + String( self.options.zoomWindowHeight ) + "px;float: left;" + "background-size: " + self.largeWidth / self.currentZoomLevel + "px " + self.largeHeight / self.currentZoomLevel + "px;" + "display: none;z-index:100;" + "border: " + String( self.options.borderSize ) + "px solid " + self.options.borderColour + ";background-repeat: no-repeat;" + "position: absolute;"; } //if inner zoom if ( self.options.zoomType == "inner" ) { //has a border been put on the image? Lets cater for this var borderWidth = self.$elem.css( "border-left-width" ); self.zoomWindowStyle = "overflow: hidden;" + "margin-left: " + String( borderWidth ) + ";" + "margin-top: " + String( borderWidth ) + ";" + "background-position: 0px 0px;" + "width: " + String( self.nzWidth ) + "px;" + "height: " + String( self.nzHeight ) + "px;" + "px;float: left;" + "display: none;" + "cursor:" + ( self.options.cursor ) + ";" + "px solid " + self.options.borderColour + ";background-repeat: no-repeat;" + "position: absolute;"; } //lens style for window zoom if ( self.options.zoomType == "window" ) { // adjust images less than the window height if ( self.nzHeight < self.options.zoomWindowWidth / self.widthRatio ) { lensHeight = self.nzHeight; } else { lensHeight = String( ( self.options.zoomWindowHeight / self.heightRatio ) ) } if ( self.largeWidth < self.options.zoomWindowWidth ) { lensWidth = self.nzWidth; } else { lensWidth = ( self.options.zoomWindowWidth / self.widthRatio ); } self.lensStyle = "background-position: 0px 0px;width: " + String( ( self.options.zoomWindowWidth ) / self.widthRatio ) + "px;height: " + String( ( self.options.zoomWindowHeight ) / self.heightRatio ) + "px;float: right;display: none;" + "overflow: hidden;" + "z-index: 999;" + "-webkit-transform: translateZ(0);" + "opacity:" + ( self.options.lensOpacity ) + ";filter: alpha(opacity = " + ( self.options.lensOpacity * 100 ) + "); zoom:1;" + "width:" + lensWidth + "px;" + "height:" + lensHeight + "px;" + "background-color:" + ( self.options.lensColour ) + ";" + "cursor:" + ( self.options.cursor ) + ";" + "border: " + ( self.options.lensBorderSize ) + "px" + " solid " + ( self.options.lensBorderColour ) + ";background-repeat: no-repeat;position: absolute;"; } //tint style self.tintStyle = "display: block;" + "position: absolute;" + "background-color: " + self.options.tintColour + ";" + "filter:alpha(opacity=0);" + "opacity: 0;" + "width: " + self.nzWidth + "px;" + "height: " + self.nzHeight + "px;" ; //lens style for lens zoom with optional round for modern browsers self.lensRound = ''; if ( self.options.zoomType == "lens" ) { self.lensStyle = "background-position: 0px 0px;" + "float: left;display: none;" + "border: " + String( self.options.borderSize ) + "px solid " + self.options.borderColour + ";" + "width:" + String( self.options.lensSize ) + "px;" + "height:" + String( self.options.lensSize ) + "px;" + "background-repeat: no-repeat;position: absolute;"; } //does not round in all browsers if ( self.options.lensShape == "round" ) { self.lensRound = "border-top-left-radius: " + String( self.options.lensSize / 2 + self.options.borderSize ) + "px;" + "border-top-right-radius: " + String( self.options.lensSize / 2 + self.options.borderSize ) + "px;" + "border-bottom-left-radius: " + String( self.options.lensSize / 2 + self.options.borderSize ) + "px;" + "border-bottom-right-radius: " + String( self.options.lensSize / 2 + self.options.borderSize ) + "px;"; } //create the div's + "" //self.zoomContainer = $('
').addClass('zoomContainer').css({"position":"relative", "height":self.nzHeight, "width":self.nzWidth}); self.zoomContainer = $( '
' ); $( 'body' ).append( self.zoomContainer ); //this will add overflow hidden and contrain the lens on lens mode if ( self.options.containLensZoom && self.options.zoomType == "lens" ) { self.zoomContainer.css( "overflow", "hidden" ); } if ( self.options.zoomType != "inner" ) { self.zoomLens = $( "
 
" ) .appendTo( self.zoomContainer ) .click( function () { self.$elem.trigger( 'click' ); } ); if ( self.options.tint ) { self.tintContainer = $( '
' ).addClass( 'tintContainer' ); self.zoomTint = $( "
" ); self.zoomLens.wrap( self.tintContainer ); self.zoomTintcss = self.zoomLens.after( self.zoomTint ); //if tint enabled - set an image to show over the tint self.zoomTintImage = $( '' ) .appendTo( self.zoomLens ) .click( function () { self.$elem.trigger( 'click' ); } ); } } //create zoom window if ( isNaN( self.options.zoomWindowPosition ) ) { self.zoomWindow = $( "
 
" ) .appendTo( 'body' ) .click( function () { self.$elem.trigger( 'click' ); } ); } else { self.zoomWindow = $( "
 
" ) .appendTo( self.zoomContainer ) .click( function () { self.$elem.trigger( 'click' ); } ); } self.zoomWindowContainer = $( '
' ).addClass( 'zoomWindowContainer' ).css( "width", self.options.zoomWindowWidth ); self.zoomWindow.wrap( self.zoomWindowContainer ); // self.captionStyle = "text-align: left;background-color: black;color: white;font-weight: bold;padding: 10px;font-family: sans-serif;font-size: 11px"; // self.zoomCaption = $('
INSERT ALT TAG
').appendTo(self.zoomWindow.parent()); if ( self.options.zoomType == "lens" ) { self.zoomLens.css( { backgroundImage: "url('" + self.imageSrc + "')" } ); } if ( self.options.zoomType == "window" ) { self.zoomWindow.css( { backgroundImage: "url('" + self.imageSrc + "')" } ); } if ( self.options.zoomType == "inner" ) { self.zoomWindow.css( { backgroundImage: "url('" + self.imageSrc + "')" } ); } /*-------------------END THE ZOOM WINDOW AND LENS----------------------------------*/ //touch events self.$elem.bind( 'touchmove', function ( e ) { e.preventDefault(); var touch = e.originalEvent.touches[0] || e.originalEvent.changedTouches[0]; self.setPosition( touch ); } ); self.zoomContainer.bind( 'touchmove', function ( e ) { if ( self.options.zoomType == "inner" ) { self.showHideWindow( "show" ); } e.preventDefault(); var touch = e.originalEvent.touches[0] || e.originalEvent.changedTouches[0]; self.setPosition( touch ); } ); self.zoomContainer.bind( 'touchend', function ( e ) { self.showHideWindow( "hide" ); if ( self.options.showLens ) { self.showHideLens( "hide" ); } if ( self.options.tint && self.options.zoomType != "inner" ) { self.showHideTint( "hide" ); } } ); self.$elem.bind( 'touchend', function ( e ) { self.showHideWindow( "hide" ); if ( self.options.showLens ) { self.showHideLens( "hide" ); } if ( self.options.tint && self.options.zoomType != "inner" ) { self.showHideTint( "hide" ); } } ); if ( self.options.showLens ) { self.zoomLens.bind( 'touchmove', function ( e ) { e.preventDefault(); var touch = e.originalEvent.touches[0] || e.originalEvent.changedTouches[0]; self.setPosition( touch ); } ); self.zoomLens.bind( 'touchend', function ( e ) { self.showHideWindow( "hide" ); if ( self.options.showLens ) { self.showHideLens( "hide" ); } if ( self.options.tint && self.options.zoomType != "inner" ) { self.showHideTint( "hide" ); } } ); } //Needed to work in IE self.$elem.bind( 'mousemove', function ( e ) { if ( self.overWindow == false ) { self.setElements( "show" ); } //make sure on orientation change the setposition is not fired if ( self.lastX !== e.clientX || self.lastY !== e.clientY ) { self.setPosition( e ); self.currentLoc = e; } self.lastX = e.clientX; self.lastY = e.clientY; } ); self.zoomContainer.bind( 'mousemove', function ( e ) { if ( self.overWindow == false ) { self.setElements( "show" ); } //make sure on orientation change the setposition is not fired if ( self.lastX !== e.clientX || self.lastY !== e.clientY ) { self.setPosition( e ); self.currentLoc = e; } self.lastX = e.clientX; self.lastY = e.clientY; } ); if ( self.options.zoomType != "inner" ) { self.zoomLens.bind( 'mousemove', function ( e ) { //make sure on orientation change the setposition is not fired if ( self.lastX !== e.clientX || self.lastY !== e.clientY ) { self.setPosition( e ); self.currentLoc = e; } self.lastX = e.clientX; self.lastY = e.clientY; } ); } if ( self.options.tint && self.options.zoomType != "inner" ) { self.zoomTint.bind( 'mousemove', function ( e ) { //make sure on orientation change the setposition is not fired if ( self.lastX !== e.clientX || self.lastY !== e.clientY ) { self.setPosition( e ); self.currentLoc = e; } self.lastX = e.clientX; self.lastY = e.clientY; } ); } if ( self.options.zoomType == "inner" ) { self.zoomWindow.bind( 'mousemove', function ( e ) { //self.overWindow = true; //make sure on orientation change the setposition is not fired if ( self.lastX !== e.clientX || self.lastY !== e.clientY ) { self.setPosition( e ); self.currentLoc = e; } self.lastX = e.clientX; self.lastY = e.clientY; } ); } // lensFadeOut: 500, zoomTintFadeIn self.zoomContainer.add( self.$elem ).mouseenter( function () { if ( self.overWindow == false ) { self.setElements( "show" ); } } ).mouseleave( function () { if ( !self.scrollLock ) { self.setElements( "hide" ); self.options.onDestroy( self.$elem ); } } ); //end ove image if ( self.options.zoomType != "inner" ) { self.zoomWindow.mouseenter( function () { self.overWindow = true; self.setElements( "hide" ); } ).mouseleave( function () { self.overWindow = false; } ); } //end ove image // var delta = parseInt(e.originalEvent.wheelDelta || -e.originalEvent.detail); // $(this).empty(); // return false; //fix for initial zoom setting if ( self.options.zoomLevel != 1 ) { // self.changeZoomLevel(self.currentZoomLevel); } //set the min zoomlevel if ( self.options.minZoomLevel ) { self.minZoomLevel = self.options.minZoomLevel; } else { self.minZoomLevel = self.options.scrollZoomIncrement * 2; } if ( self.options.scrollZoom ) { self.zoomContainer.add( self.$elem ).bind( 'mousewheel DOMMouseScroll MozMousePixelScroll', function ( e ) { // in IE there is issue with firing of mouseleave - So check whether still scrolling // and on mouseleave check if scrolllock self.scrollLock = true; clearTimeout( $.data( this, 'timer' ) ); $.data( this, 'timer', setTimeout( function () { self.scrollLock = false; //do something }, 250 ) ); var theEvent = e.originalEvent.wheelDelta || e.originalEvent.detail * -1 //this.scrollTop += ( delta < 0 ? 1 : -1 ) * 30; // e.preventDefault(); e.stopImmediatePropagation(); e.stopPropagation(); e.preventDefault(); if ( theEvent / 120 > 0 ) { //scrolling up if ( self.currentZoomLevel >= self.minZoomLevel ) { self.changeZoomLevel( self.currentZoomLevel - self.options.scrollZoomIncrement ); } } else { //scrolling down if ( self.options.maxZoomLevel ) { if ( self.currentZoomLevel <= self.options.maxZoomLevel ) { self.changeZoomLevel( parseFloat( self.currentZoomLevel ) + self.options.scrollZoomIncrement ); } } else { //andy self.changeZoomLevel( parseFloat( self.currentZoomLevel ) + self.options.scrollZoomIncrement ); } } return false; } ); } }, setElements: function ( type ) { var self = this; if ( !self.options.zoomEnabled ) { return false; } if ( type == "show" ) { if ( self.isWindowSet ) { if ( self.options.zoomType == "inner" ) { self.showHideWindow( "show" ); } if ( self.options.zoomType == "window" ) { self.showHideWindow( "show" ); } if ( self.options.showLens ) { self.showHideLens( "show" ); } if ( self.options.tint && self.options.zoomType != "inner" ) { self.showHideTint( "show" ); } } } if ( type == "hide" ) { if ( self.options.zoomType == "window" ) { self.showHideWindow( "hide" ); } if ( !self.options.tint ) { self.showHideWindow( "hide" ); } if ( self.options.showLens ) { self.showHideLens( "hide" ); } if ( self.options.tint ) { self.showHideTint( "hide" ); } } }, setPosition: function ( e ) { var self = this; if ( !self.options.zoomEnabled ) { return false; } //recaclc offset each time in case the image moves //this can be caused by other on page elements self.nzHeight = self.$elem.height(); self.nzWidth = self.$elem.width(); self.nzOffset = self.$elem.offset(); if ( self.options.tint && self.options.zoomType != "inner" ) { self.zoomTint.css( { top: 0 } ); self.zoomTint.css( { left: 0 } ); } //set responsive //will checking if the image needs changing before running this code work faster? if ( self.options.responsive && !self.options.scrollZoom ) { if ( self.options.showLens ) { if ( self.nzHeight < self.options.zoomWindowWidth / self.widthRatio ) { lensHeight = self.nzHeight; } else { lensHeight = String( ( self.options.zoomWindowHeight / self.heightRatio ) ) } if ( self.largeWidth < self.options.zoomWindowWidth ) { lensWidth = self.nzWidth; } else { lensWidth = ( self.options.zoomWindowWidth / self.widthRatio ); } self.widthRatio = self.largeWidth / self.nzWidth; self.heightRatio = self.largeHeight / self.nzHeight; if ( self.options.zoomType != "lens" ) { //possibly dont need to keep recalcalculating //if the lens is heigher than the image, then set lens size to image size if ( self.nzHeight < self.options.zoomWindowWidth / self.widthRatio ) { lensHeight = self.nzHeight; } else { lensHeight = String( ( self.options.zoomWindowHeight / self.heightRatio ) ) } if ( self.nzWidth < self.options.zoomWindowHeight / self.heightRatio ) { lensWidth = self.nzWidth; } else { lensWidth = String( ( self.options.zoomWindowWidth / self.widthRatio ) ); } self.zoomLens.css( 'width', lensWidth ); self.zoomLens.css( 'height', lensHeight ); if ( self.options.tint ) { self.zoomTintImage.css( 'width', self.nzWidth ); self.zoomTintImage.css( 'height', self.nzHeight ); } } if ( self.options.zoomType == "lens" ) { self.zoomLens.css( { width: String( self.options.lensSize ) + 'px', height: String( self.options.lensSize ) + 'px' } ) } //end responsive image change } } //container fix self.zoomContainer.css( { top: self.nzOffset.top } ); self.zoomContainer.css( { left: self.nzOffset.left } ); self.mouseLeft = parseInt( e.pageX - self.nzOffset.left ); self.mouseTop = parseInt( e.pageY - self.nzOffset.top ); //calculate the Location of the Lens //calculate the bound regions - but only if zoom window if ( self.options.zoomType == "window" ) { self.Etoppos = ( self.mouseTop < ( self.zoomLens.height() / 2 ) ); self.Eboppos = ( self.mouseTop > self.nzHeight - ( self.zoomLens.height() / 2 ) - ( self.options.lensBorderSize * 2 ) ); self.Eloppos = ( self.mouseLeft < 0 + ( ( self.zoomLens.width() / 2 ) ) ); self.Eroppos = ( self.mouseLeft > ( self.nzWidth - ( self.zoomLens.width() / 2 ) - ( self.options.lensBorderSize * 2 ) ) ); } //calculate the bound regions - but only for inner zoom if ( self.options.zoomType == "inner" ) { self.Etoppos = ( self.mouseTop < ( ( self.nzHeight / 2 ) / self.heightRatio ) ); self.Eboppos = ( self.mouseTop > ( self.nzHeight - ( ( self.nzHeight / 2 ) / self.heightRatio ) ) ); self.Eloppos = ( self.mouseLeft < 0 + ( ( ( self.nzWidth / 2 ) / self.widthRatio ) ) ); self.Eroppos = ( self.mouseLeft > ( self.nzWidth - ( self.nzWidth / 2 ) / self.widthRatio - ( self.options.lensBorderSize * 2 ) ) ); } // if the mouse position of the slider is one of the outerbounds, then hide window and lens if ( self.mouseLeft < 0 || self.mouseTop < 0 || self.mouseLeft > self.nzWidth || self.mouseTop > self.nzHeight ) { self.setElements( "hide" ); return; } //else continue with operations else { //lens options if ( self.options.showLens ) { // self.showHideLens("show"); //set background position of lens self.lensLeftPos = String( Math.floor( self.mouseLeft - self.zoomLens.width() / 2 ) ); self.lensTopPos = String( Math.floor( self.mouseTop - self.zoomLens.height() / 2 ) ); } //adjust the background position if the mouse is in one of the outer regions //Top region if ( self.Etoppos ) { self.lensTopPos = 0; } //Left Region if ( self.Eloppos ) { self.windowLeftPos = 0; self.lensLeftPos = 0; self.tintpos = 0; } //Set bottom and right region for window mode if ( self.options.zoomType == "window" ) { if ( self.Eboppos ) { self.lensTopPos = Math.max( ( self.nzHeight ) - self.zoomLens.height() - ( self.options.lensBorderSize * 2 ), 0 ); } if ( self.Eroppos ) { self.lensLeftPos = ( self.nzWidth - ( self.zoomLens.width() ) - ( self.options.lensBorderSize * 2 ) ); } } //Set bottom and right region for inner mode if ( self.options.zoomType == "inner" ) { if ( self.Eboppos ) { self.lensTopPos = Math.max( ( ( self.nzHeight ) - ( self.options.lensBorderSize * 2 ) ), 0 ); } if ( self.Eroppos ) { self.lensLeftPos = ( self.nzWidth - ( self.nzWidth ) - ( self.options.lensBorderSize * 2 ) ); } } //if lens zoom if ( self.options.zoomType == "lens" ) { self.windowLeftPos = String( ( ( e.pageX - self.nzOffset.left ) * self.widthRatio - self.zoomLens.width() / 2 ) * ( -1 ) ); self.windowTopPos = String( ( ( e.pageY - self.nzOffset.top ) * self.heightRatio - self.zoomLens.height() / 2 ) * ( -1 ) ); self.zoomLens.css( { backgroundPosition: self.windowLeftPos + 'px ' + self.windowTopPos + 'px' } ); if ( self.changeBgSize ) { if ( self.nzHeight > self.nzWidth ) { if ( self.options.zoomType == "lens" ) { self.zoomLens.css( { "background-size": self.largeWidth / self.newvalueheight + 'px ' + self.largeHeight / self.newvalueheight + 'px' } ); } self.zoomWindow.css( { "background-size": self.largeWidth / self.newvalueheight + 'px ' + self.largeHeight / self.newvalueheight + 'px' } ); } else { if ( self.options.zoomType == "lens" ) { self.zoomLens.css( { "background-size": self.largeWidth / self.newvaluewidth + 'px ' + self.largeHeight / self.newvaluewidth + 'px' } ); } self.zoomWindow.css( { "background-size": self.largeWidth / self.newvaluewidth + 'px ' + self.largeHeight / self.newvaluewidth + 'px' } ); } self.changeBgSize = false; } self.setWindowPostition( e ); } //if tint zoom if ( self.options.tint && self.options.zoomType != "inner" ) { self.setTintPosition( e ); } //set the css background position if ( self.options.zoomType == "window" ) { self.setWindowPostition( e ); } if ( self.options.zoomType == "inner" ) { self.setWindowPostition( e ); } if ( self.options.showLens ) { if ( self.fullwidth && self.options.zoomType != "lens" ) { self.lensLeftPos = 0; } self.zoomLens.css( { left: self.lensLeftPos + 'px', top: self.lensTopPos + 'px' } ) } } //end else }, showHideWindow: function ( change ) { var self = this; if ( change == "show" ) { if ( !self.isWindowActive ) { if ( self.options.zoomWindowFadeIn ) { self.zoomWindow.stop( true, true, false ).fadeIn( self.options.zoomWindowFadeIn ); } else { self.zoomWindow.show(); } self.isWindowActive = true; } } if ( change == "hide" ) { if ( self.isWindowActive ) { if ( self.options.zoomWindowFadeOut ) { self.zoomWindow.stop( true, true ).fadeOut( self.options.zoomWindowFadeOut, function () { if ( self.loop ) { //stop moving the zoom window when zoom window is faded out clearInterval( self.loop ); self.loop = false; } } ); } else { self.zoomWindow.hide(); } self.isWindowActive = false; } } }, showHideLens: function ( change ) { var self = this; if ( change == "show" ) { if ( !self.isLensActive ) { if ( self.options.lensFadeIn ) { self.zoomLens.stop( true, true, false ).fadeIn( self.options.lensFadeIn ); } else { self.zoomLens.show(); } self.isLensActive = true; } } if ( change == "hide" ) { if ( self.isLensActive ) { if ( self.options.lensFadeOut ) { self.zoomLens.stop( true, true ).fadeOut( self.options.lensFadeOut ); } else { self.zoomLens.hide(); } self.isLensActive = false; } } }, showHideTint: function ( change ) { var self = this; if ( change == "show" ) { if ( !self.isTintActive ) { if ( self.options.zoomTintFadeIn ) { self.zoomTint.css( { opacity: self.options.tintOpacity } ).animate().stop( true, true ).fadeIn( "slow" ); } else { self.zoomTint.css( { opacity: self.options.tintOpacity } ).animate(); self.zoomTint.show(); } self.isTintActive = true; } } if ( change == "hide" ) { if ( self.isTintActive ) { if ( self.options.zoomTintFadeOut ) { self.zoomTint.stop( true, true ).fadeOut( self.options.zoomTintFadeOut ); } else { self.zoomTint.hide(); } self.isTintActive = false; } } }, setLensPostition: function ( e ) { }, setWindowPostition: function ( e ) { //return obj.slice( 0, count ); var self = this; if ( !isNaN( self.options.zoomWindowPosition ) ) { switch ( self.options.zoomWindowPosition ) { case 1: //done self.windowOffsetTop = ( self.options.zoomWindowOffety );//DONE - 1 self.windowOffsetLeft = ( +self.nzWidth ); //DONE 1, 2, 3, 4, 16 break; case 2: if ( self.options.zoomWindowHeight > self.nzHeight ) { //positive margin self.windowOffsetTop = ( ( self.options.zoomWindowHeight / 2 ) - ( self.nzHeight / 2 ) ) * ( -1 ); self.windowOffsetLeft = ( self.nzWidth ); //DONE 1, 2, 3, 4, 16 } else { //negative margin } break; case 3: //done self.windowOffsetTop = ( self.nzHeight - self.zoomWindow.height() - ( self.options.borderSize * 2 ) ); //DONE 3,9 self.windowOffsetLeft = ( self.nzWidth ); //DONE 1, 2, 3, 4, 16 break; case 4: //done self.windowOffsetTop = ( self.nzHeight ); //DONE - 4,5,6,7,8 self.windowOffsetLeft = ( self.nzWidth ); //DONE 1, 2, 3, 4, 16 break; case 5: //done self.windowOffsetTop = ( self.nzHeight ); //DONE - 4,5,6,7,8 self.windowOffsetLeft = ( self.nzWidth - self.zoomWindow.width() - ( self.options.borderSize * 2 ) ); //DONE - 5,15 break; case 6: if ( self.options.zoomWindowHeight > self.nzHeight ) { //positive margin self.windowOffsetTop = ( self.nzHeight ); //DONE - 4,5,6,7,8 self.windowOffsetLeft = ( ( self.options.zoomWindowWidth / 2 ) - ( self.nzWidth / 2 ) + ( self.options.borderSize * 2 ) ) * ( -1 ); } else { //negative margin } break; case 7: //done self.windowOffsetTop = ( self.nzHeight ); //DONE - 4,5,6,7,8 self.windowOffsetLeft = 0; //DONE 7, 13 break; case 8: //done self.windowOffsetTop = ( self.nzHeight ); //DONE - 4,5,6,7,8 self.windowOffsetLeft = ( self.zoomWindow.width() + ( self.options.borderSize * 2 ) ) * ( -1 ); //DONE 8,9,10,11,12 break; case 9: //done self.windowOffsetTop = ( self.nzHeight - self.zoomWindow.height() - ( self.options.borderSize * 2 ) ); //DONE 3,9 self.windowOffsetLeft = ( self.zoomWindow.width() + ( self.options.borderSize * 2 ) ) * ( -1 ); //DONE 8,9,10,11,12 break; case 10: if ( self.options.zoomWindowHeight > self.nzHeight ) { //positive margin self.windowOffsetTop = ( ( self.options.zoomWindowHeight / 2 ) - ( self.nzHeight / 2 ) ) * ( -1 ); self.windowOffsetLeft = ( self.zoomWindow.width() + ( self.options.borderSize * 2 ) ) * ( -1 ); //DONE 8,9,10,11,12 } else { //negative margin } break; case 11: self.windowOffsetTop = ( self.options.zoomWindowOffety ); self.windowOffsetLeft = ( self.zoomWindow.width() + ( self.options.borderSize * 2 ) ) * ( -1 ); //DONE 8,9,10,11,12 break; case 12: //done self.windowOffsetTop = ( self.zoomWindow.height() + ( self.options.borderSize * 2 ) ) * ( -1 ); //DONE 12,13,14,15,16 self.windowOffsetLeft = ( self.zoomWindow.width() + ( self.options.borderSize * 2 ) ) * ( -1 ); //DONE 8,9,10,11,12 break; case 13: //done self.windowOffsetTop = ( self.zoomWindow.height() + ( self.options.borderSize * 2 ) ) * ( -1 ); //DONE 12,13,14,15,16 self.windowOffsetLeft = ( 0 ); //DONE 7, 13 break; case 14: if ( self.options.zoomWindowHeight > self.nzHeight ) { //positive margin self.windowOffsetTop = ( self.zoomWindow.height() + ( self.options.borderSize * 2 ) ) * ( -1 ); //DONE 12,13,14,15,16 self.windowOffsetLeft = ( ( self.options.zoomWindowWidth / 2 ) - ( self.nzWidth / 2 ) + ( self.options.borderSize * 2 ) ) * ( -1 ); } else { //negative margin } break; case 15://done self.windowOffsetTop = ( self.zoomWindow.height() + ( self.options.borderSize * 2 ) ) * ( -1 ); //DONE 12,13,14,15,16 self.windowOffsetLeft = ( self.nzWidth - self.zoomWindow.width() - ( self.options.borderSize * 2 ) ); //DONE - 5,15 break; case 16: //done self.windowOffsetTop = ( self.zoomWindow.height() + ( self.options.borderSize * 2 ) ) * ( -1 ); //DONE 12,13,14,15,16 self.windowOffsetLeft = ( self.nzWidth ); //DONE 1, 2, 3, 4, 16 break; default: //done self.windowOffsetTop = ( self.options.zoomWindowOffety );//DONE - 1 self.windowOffsetLeft = ( self.nzWidth ); //DONE 1, 2, 3, 4, 16 } } //end isNAN else { //WE CAN POSITION IN A CLASS - ASSUME THAT ANY STRING PASSED IS self.externalContainer = $( '#' + self.options.zoomWindowPosition ); self.externalContainerWidth = self.externalContainer.width(); self.externalContainerHeight = self.externalContainer.height(); self.externalContainerOffset = self.externalContainer.offset(); self.windowOffsetTop = self.externalContainerOffset.top;//DONE - 1 self.windowOffsetLeft = self.externalContainerOffset.left; //DONE 1, 2, 3, 4, 16 } self.isWindowSet = true; self.windowOffsetTop = self.windowOffsetTop + self.options.zoomWindowOffety; self.windowOffsetLeft = self.windowOffsetLeft + self.options.zoomWindowOffetx; self.zoomWindow.css( { top: self.windowOffsetTop } ); self.zoomWindow.css( { left: self.windowOffsetLeft } ); if ( self.options.zoomType == "inner" ) { self.zoomWindow.css( { top: 0 } ); self.zoomWindow.css( { left: 0 } ); } self.windowLeftPos = String( ( ( e.pageX - self.nzOffset.left ) * self.widthRatio - self.zoomWindow.width() / 2 ) * ( -1 ) ); self.windowTopPos = String( ( ( e.pageY - self.nzOffset.top ) * self.heightRatio - self.zoomWindow.height() / 2 ) * ( -1 ) ); if ( self.Etoppos ) { self.windowTopPos = 0; } if ( self.Eloppos ) { self.windowLeftPos = 0; } if ( self.Eboppos ) { self.windowTopPos = ( self.largeHeight / self.currentZoomLevel - self.zoomWindow.height() ) * ( -1 ); } if ( self.Eroppos ) { self.windowLeftPos = ( ( self.largeWidth / self.currentZoomLevel - self.zoomWindow.width() ) * ( -1 ) ); } //stops micro movements if ( self.fullheight ) { self.windowTopPos = 0; } if ( self.fullwidth ) { self.windowLeftPos = 0; } //set the css background position if ( self.options.zoomType == "window" || self.options.zoomType == "inner" ) { if ( self.zoomLock == 1 ) { //overrides for images not zoomable if ( self.widthRatio <= 1 ) { self.windowLeftPos = 0; } if ( self.heightRatio <= 1 ) { self.windowTopPos = 0; } } // adjust images less than the window height if ( self.options.zoomType == "window" ) { if ( self.largeHeight < self.options.zoomWindowHeight ) { self.windowTopPos = 0; } if ( self.largeWidth < self.options.zoomWindowWidth ) { self.windowLeftPos = 0; } } //set the zoomwindow background position if ( self.options.easing ) { // if(self.changeZoom){ // clearInterval(self.loop); // self.changeZoom = false; // self.loop = false; // } //set the pos to 0 if not set if ( !self.xp ) { self.xp = 0; } if ( !self.yp ) { self.yp = 0; } //if loop not already started, then run it if ( !self.loop ) { self.loop = setInterval( function () { //using zeno's paradox self.xp += ( self.windowLeftPos - self.xp ) / self.options.easingAmount; self.yp += ( self.windowTopPos - self.yp ) / self.options.easingAmount; if ( self.scrollingLock ) { clearInterval( self.loop ); self.xp = self.windowLeftPos; self.yp = self.windowTopPos self.xp = ( ( e.pageX - self.nzOffset.left ) * self.widthRatio - self.zoomWindow.width() / 2 ) * ( -1 ); self.yp = ( ( ( e.pageY - self.nzOffset.top ) * self.heightRatio - self.zoomWindow.height() / 2 ) * ( -1 ) ); if ( self.changeBgSize ) { if ( self.nzHeight > self.nzWidth ) { if ( self.options.zoomType == "lens" ) { self.zoomLens.css( { "background-size": self.largeWidth / self.newvalueheight + 'px ' + self.largeHeight / self.newvalueheight + 'px' } ); } self.zoomWindow.css( { "background-size": self.largeWidth / self.newvalueheight + 'px ' + self.largeHeight / self.newvalueheight + 'px' } ); } else { if ( self.options.zoomType != "lens" ) { self.zoomLens.css( { "background-size": self.largeWidth / self.newvaluewidth + 'px ' + self.largeHeight / self.newvalueheight + 'px' } ); } self.zoomWindow.css( { "background-size": self.largeWidth / self.newvaluewidth + 'px ' + self.largeHeight / self.newvaluewidth + 'px' } ); } /* if(!self.bgxp){self.bgxp = self.largeWidth/self.newvalue;} if(!self.bgyp){self.bgyp = self.largeHeight/self.newvalue ;} if (!self.bgloop){ self.bgloop = setInterval(function(){ self.bgxp += (self.largeWidth/self.newvalue - self.bgxp) / self.options.easingAmount; self.bgyp += (self.largeHeight/self.newvalue - self.bgyp) / self.options.easingAmount; self.zoomWindow.css({ "background-size": self.bgxp + 'px ' + self.bgyp + 'px' }); }, 16); } */ self.changeBgSize = false; } self.zoomWindow.css( { backgroundPosition: self.windowLeftPos + 'px ' + self.windowTopPos + 'px' } ); self.scrollingLock = false; self.loop = false; } else if ( Math.round( Math.abs( self.xp - self.windowLeftPos ) + Math.abs( self.yp - self.windowTopPos ) ) < 1 ) { //stops micro movements clearInterval( self.loop ); self.zoomWindow.css( { backgroundPosition: self.windowLeftPos + 'px ' + self.windowTopPos + 'px' } ); self.loop = false; } else { if ( self.changeBgSize ) { if ( self.nzHeight > self.nzWidth ) { if ( self.options.zoomType == "lens" ) { self.zoomLens.css( { "background-size": self.largeWidth / self.newvalueheight + 'px ' + self.largeHeight / self.newvalueheight + 'px' } ); } self.zoomWindow.css( { "background-size": self.largeWidth / self.newvalueheight + 'px ' + self.largeHeight / self.newvalueheight + 'px' } ); } else { if ( self.options.zoomType != "lens" ) { self.zoomLens.css( { "background-size": self.largeWidth / self.newvaluewidth + 'px ' + self.largeHeight / self.newvaluewidth + 'px' } ); } self.zoomWindow.css( { "background-size": self.largeWidth / self.newvaluewidth + 'px ' + self.largeHeight / self.newvaluewidth + 'px' } ); } self.changeBgSize = false; } self.zoomWindow.css( { backgroundPosition: self.xp + 'px ' + self.yp + 'px' } ); } }, 16 ); } } else { if ( self.changeBgSize ) { if ( self.nzHeight > self.nzWidth ) { if ( self.options.zoomType == "lens" ) { self.zoomLens.css( { "background-size": self.largeWidth / self.newvalueheight + 'px ' + self.largeHeight / self.newvalueheight + 'px' } ); } self.zoomWindow.css( { "background-size": self.largeWidth / self.newvalueheight + 'px ' + self.largeHeight / self.newvalueheight + 'px' } ); } else { if ( self.options.zoomType == "lens" ) { self.zoomLens.css( { "background-size": self.largeWidth / self.newvaluewidth + 'px ' + self.largeHeight / self.newvaluewidth + 'px' } ); } if ( ( self.largeHeight / self.newvaluewidth ) < self.options.zoomWindowHeight ) { self.zoomWindow.css( { "background-size": self.largeWidth / self.newvaluewidth + 'px ' + self.largeHeight / self.newvaluewidth + 'px' } ); } else { self.zoomWindow.css( { "background-size": self.largeWidth / self.newvalueheight + 'px ' + self.largeHeight / self.newvalueheight + 'px' } ); } } self.changeBgSize = false; } self.zoomWindow.css( { backgroundPosition: self.windowLeftPos + 'px ' + self.windowTopPos + 'px' } ); } } }, setTintPosition: function ( e ) { var self = this; self.nzOffset = self.$elem.offset(); self.tintpos = String( ( ( e.pageX - self.nzOffset.left ) - ( self.zoomLens.width() / 2 ) ) * ( -1 ) ); self.tintposy = String( ( ( e.pageY - self.nzOffset.top ) - self.zoomLens.height() / 2 ) * ( -1 ) ); if ( self.Etoppos ) { self.tintposy = 0; } if ( self.Eloppos ) { self.tintpos = 0; } if ( self.Eboppos ) { self.tintposy = ( self.nzHeight - self.zoomLens.height() - ( self.options.lensBorderSize * 2 ) ) * ( -1 ); } if ( self.Eroppos ) { self.tintpos = ( ( self.nzWidth - self.zoomLens.width() - ( self.options.lensBorderSize * 2 ) ) * ( -1 ) ); } if ( self.options.tint ) { //stops micro movements if ( self.fullheight ) { self.tintposy = 0; } if ( self.fullwidth ) { self.tintpos = 0; } self.zoomTintImage.css( { 'left': self.tintpos + 'px' } ); self.zoomTintImage.css( { 'top': self.tintposy + 'px' } ); } }, swaptheimage: function ( smallimage, largeimage ) { var self = this; var newImg = new Image(); if ( self.options.loadingIcon ) { self.spinner = $( '
' ); self.$elem.after( self.spinner ); } self.options.onImageSwap( self.$elem ); newImg.onload = function () { self.largeWidth = newImg.width; self.largeHeight = newImg.height; self.zoomImage = largeimage; self.zoomWindow.css( { "background-size": self.largeWidth + 'px ' + self.largeHeight + 'px' } ); self.swapAction( smallimage, largeimage ); return; } newImg.src = largeimage; // this must be done AFTER setting onload }, swapAction: function ( smallimage, largeimage ) { var self = this; var newImg2 = new Image(); newImg2.onload = function () { //re-calculate values self.nzHeight = newImg2.height; self.nzWidth = newImg2.width; self.options.onImageSwapComplete( self.$elem ); self.doneCallback(); return; } newImg2.src = smallimage; //reset the zoomlevel to that initially set in options self.currentZoomLevel = self.options.zoomLevel; self.options.maxZoomLevel = false; //swaps the main image //self.$elem.attr("src",smallimage); //swaps the zoom image if ( self.options.zoomType == "lens" ) { self.zoomLens.css( { backgroundImage: "url('" + largeimage + "')" } ); } if ( self.options.zoomType == "window" ) { self.zoomWindow.css( { backgroundImage: "url('" + largeimage + "')" } ); } if ( self.options.zoomType == "inner" ) { self.zoomWindow.css( { backgroundImage: "url('" + largeimage + "')" } ); } self.currentImage = largeimage; if ( self.options.imageCrossfade ) { var oldImg = self.$elem; var newImg = oldImg.clone(); self.$elem.attr( "src", smallimage ) self.$elem.after( newImg ); newImg.stop( true ).fadeOut( self.options.imageCrossfade, function () { $( this ).remove(); } ); // if(self.options.zoomType == "inner"){ //remove any attributes on the cloned image so we can resize later self.$elem.width( "auto" ).removeAttr( "width" ); self.$elem.height( "auto" ).removeAttr( "height" ); // } oldImg.fadeIn( self.options.imageCrossfade ); if ( self.options.tint && self.options.zoomType != "inner" ) { var oldImgTint = self.zoomTintImage; var newImgTint = oldImgTint.clone(); self.zoomTintImage.attr( "src", largeimage ) self.zoomTintImage.after( newImgTint ); newImgTint.stop( true ).fadeOut( self.options.imageCrossfade, function () { $( this ).remove(); } ); oldImgTint.fadeIn( self.options.imageCrossfade ); //self.zoomTintImage.attr("width",elem.data("image")); //resize the tint window self.zoomTint.css( { height: self.$elem.height() } ); self.zoomTint.css( { width: self.$elem.width() } ); } self.zoomContainer.css( "height", self.$elem.height() ); self.zoomContainer.css( "width", self.$elem.width() ); if ( self.options.zoomType == "inner" ) { if ( !self.options.constrainType ) { self.zoomWrap.parent().css( "height", self.$elem.height() ); self.zoomWrap.parent().css( "width", self.$elem.width() ); self.zoomWindow.css( "height", self.$elem.height() ); self.zoomWindow.css( "width", self.$elem.width() ); } } if ( self.options.imageCrossfade ) { self.zoomWrap.css( "height", self.$elem.height() ); self.zoomWrap.css( "width", self.$elem.width() ); } } else { self.$elem.attr( "src", smallimage ); if ( self.options.tint ) { self.zoomTintImage.attr( "src", largeimage ); //self.zoomTintImage.attr("width",elem.data("image")); self.zoomTintImage.attr( "height", self.$elem.height() ); //self.zoomTintImage.attr('src') = elem.data("image"); self.zoomTintImage.css( { height: self.$elem.height() } ); self.zoomTint.css( { height: self.$elem.height() } ); } self.zoomContainer.css( "height", self.$elem.height() ); self.zoomContainer.css( "width", self.$elem.width() ); if ( self.options.imageCrossfade ) { self.zoomWrap.css( "height", self.$elem.height() ); self.zoomWrap.css( "width", self.$elem.width() ); } } if ( self.options.constrainType ) { //This will contrain the image proportions if ( self.options.constrainType == "height" ) { self.zoomContainer.css( "height", self.options.constrainSize ); self.zoomContainer.css( "width", "auto" ); if ( self.options.imageCrossfade ) { self.zoomWrap.css( "height", self.options.constrainSize ); self.zoomWrap.css( "width", "auto" ); self.constwidth = self.zoomWrap.width(); } else { self.$elem.css( "height", self.options.constrainSize ); self.$elem.css( "width", "auto" ); self.constwidth = self.$elem.width(); } if ( self.options.zoomType == "inner" ) { self.zoomWrap.parent().css( "height", self.options.constrainSize ); self.zoomWrap.parent().css( "width", self.constwidth ); self.zoomWindow.css( "height", self.options.constrainSize ); self.zoomWindow.css( "width", self.constwidth ); } if ( self.options.tint ) { self.tintContainer.css( "height", self.options.constrainSize ); self.tintContainer.css( "width", self.constwidth ); self.zoomTint.css( "height", self.options.constrainSize ); self.zoomTint.css( "width", self.constwidth ); self.zoomTintImage.css( "height", self.options.constrainSize ); self.zoomTintImage.css( "width", self.constwidth ); } } if ( self.options.constrainType == "width" ) { self.zoomContainer.css( "height", "auto" ); self.zoomContainer.css( "width", self.options.constrainSize ); if ( self.options.imageCrossfade ) { self.zoomWrap.css( "height", "auto" ); self.zoomWrap.css( "width", self.options.constrainSize ); self.constheight = self.zoomWrap.height(); } else { self.$elem.css( "height", "auto" ); self.$elem.css( "width", self.options.constrainSize ); self.constheight = self.$elem.height(); } if ( self.options.zoomType == "inner" ) { self.zoomWrap.parent().css( "height", self.constheight ); self.zoomWrap.parent().css( "width", self.options.constrainSize ); self.zoomWindow.css( "height", self.constheight ); self.zoomWindow.css( "width", self.options.constrainSize ); } if ( self.options.tint ) { self.tintContainer.css( "height", self.constheight ); self.tintContainer.css( "width", self.options.constrainSize ); self.zoomTint.css( "height", self.constheight ); self.zoomTint.css( "width", self.options.constrainSize ); self.zoomTintImage.css( "height", self.constheight ); self.zoomTintImage.css( "width", self.options.constrainSize ); } } } }, doneCallback: function () { var self = this; if ( self.options.loadingIcon ) { self.spinner.hide(); } self.nzOffset = self.$elem.offset(); self.nzWidth = self.$elem.width(); self.nzHeight = self.$elem.height(); // reset the zoomlevel back to default self.currentZoomLevel = self.options.zoomLevel; //ratio of the large to small image self.widthRatio = self.largeWidth / self.nzWidth; self.heightRatio = self.largeHeight / self.nzHeight; //NEED TO ADD THE LENS SIZE FOR ROUND // adjust images less than the window height if ( self.options.zoomType == "window" ) { if ( self.nzHeight < self.options.zoomWindowWidth / self.widthRatio ) { lensHeight = self.nzHeight; } else { lensHeight = String( ( self.options.zoomWindowHeight / self.heightRatio ) ) } if ( self.options.zoomWindowWidth < self.options.zoomWindowWidth ) { lensWidth = self.nzWidth; } else { lensWidth = ( self.options.zoomWindowWidth / self.widthRatio ); } if ( self.zoomLens ) { self.zoomLens.css( 'width', lensWidth ); self.zoomLens.css( 'height', lensHeight ); } } }, getCurrentImage: function () { var self = this; return self.zoomImage; }, getGalleryList: function () { var self = this; //loop through the gallery options and set them in list for fancybox self.gallerylist = [ ]; if ( self.options.gallery ) { $( '#' + self.options.gallery + ' a' ).each( function () { var img_src = ''; if ( $( this ).data( "zoom-image" ) ) { img_src = $( this ).data( "zoom-image" ); } else if ( $( this ).data( "image" ) ) { img_src = $( this ).data( "image" ); } //put the current image at the start if ( img_src == self.zoomImage ) { self.gallerylist.unshift( { href: '' + img_src + '', title: $( this ).find( 'img' ).attr( "title" ) } ); } else { self.gallerylist.push( { href: '' + img_src + '', title: $( this ).find( 'img' ).attr( "title" ) } ); } } ); } //if no gallery - return current image else { self.gallerylist.push( { href: '' + self.zoomImage + '', title: $( this ).find( 'img' ).attr( "title" ) } ); } return self.gallerylist; }, changeZoomLevel: function ( value ) { var self = this; //flag a zoom, so can adjust the easing during setPosition self.scrollingLock = true; //round to two decimal places self.newvalue = parseFloat( value ).toFixed( 2 ); newvalue = parseFloat( value ).toFixed( 2 ); //maxwidth & Maxheight of the image maxheightnewvalue = self.largeHeight / ( ( self.options.zoomWindowHeight / self.nzHeight ) * self.nzHeight ); maxwidthtnewvalue = self.largeWidth / ( ( self.options.zoomWindowWidth / self.nzWidth ) * self.nzWidth ); //calculate new heightratio if ( self.options.zoomType != "inner" ) { if ( maxheightnewvalue <= newvalue ) { self.heightRatio = ( self.largeHeight / maxheightnewvalue ) / self.nzHeight; self.newvalueheight = maxheightnewvalue; self.fullheight = true; } else { self.heightRatio = ( self.largeHeight / newvalue ) / self.nzHeight; self.newvalueheight = newvalue; self.fullheight = false; } // calculate new width ratio if ( maxwidthtnewvalue <= newvalue ) { self.widthRatio = ( self.largeWidth / maxwidthtnewvalue ) / self.nzWidth; self.newvaluewidth = maxwidthtnewvalue; self.fullwidth = true; } else { self.widthRatio = ( self.largeWidth / newvalue ) / self.nzWidth; self.newvaluewidth = newvalue; self.fullwidth = false; } if ( self.options.zoomType == "lens" ) { if ( maxheightnewvalue <= newvalue ) { self.fullwidth = true; self.newvaluewidth = maxheightnewvalue; } else { self.widthRatio = ( self.largeWidth / newvalue ) / self.nzWidth; self.newvaluewidth = newvalue; self.fullwidth = false; } } } if ( self.options.zoomType == "inner" ) { maxheightnewvalue = parseFloat( self.largeHeight / self.nzHeight ).toFixed( 2 ); maxwidthtnewvalue = parseFloat( self.largeWidth / self.nzWidth ).toFixed( 2 ); if ( newvalue > maxheightnewvalue ) { newvalue = maxheightnewvalue; } if ( newvalue > maxwidthtnewvalue ) { newvalue = maxwidthtnewvalue; } if ( maxheightnewvalue <= newvalue ) { self.heightRatio = ( self.largeHeight / newvalue ) / self.nzHeight; if ( newvalue > maxheightnewvalue ) { self.newvalueheight = maxheightnewvalue; } else { self.newvalueheight = newvalue; } self.fullheight = true; } else { self.heightRatio = ( self.largeHeight / newvalue ) / self.nzHeight; if ( newvalue > maxheightnewvalue ) { self.newvalueheight = maxheightnewvalue; } else { self.newvalueheight = newvalue; } self.fullheight = false; } if ( maxwidthtnewvalue <= newvalue ) { self.widthRatio = ( self.largeWidth / newvalue ) / self.nzWidth; if ( newvalue > maxwidthtnewvalue ) { self.newvaluewidth = maxwidthtnewvalue; } else { self.newvaluewidth = newvalue; } self.fullwidth = true; } else { self.widthRatio = ( self.largeWidth / newvalue ) / self.nzWidth; self.newvaluewidth = newvalue; self.fullwidth = false; } } //end inner scrcontinue = false; if ( self.options.zoomType == "inner" ) { if ( self.nzWidth >= self.nzHeight ) { if ( self.newvaluewidth <= maxwidthtnewvalue ) { scrcontinue = true; } else { scrcontinue = false; self.fullheight = true; self.fullwidth = true; } } if ( self.nzHeight > self.nzWidth ) { if ( self.newvaluewidth <= maxwidthtnewvalue ) { scrcontinue = true; } else { scrcontinue = false; self.fullheight = true; self.fullwidth = true; } } } if ( self.options.zoomType != "inner" ) { scrcontinue = true; } if ( scrcontinue ) { self.zoomLock = 0; self.changeZoom = true; //if lens height is less than image height if ( ( ( self.options.zoomWindowHeight ) / self.heightRatio ) <= self.nzHeight ) { self.currentZoomLevel = self.newvalueheight; if ( self.options.zoomType != "lens" && self.options.zoomType != "inner" ) { self.changeBgSize = true; self.zoomLens.css( { height: String( ( self.options.zoomWindowHeight ) / self.heightRatio ) + 'px' } ) } if ( self.options.zoomType == "lens" || self.options.zoomType == "inner" ) { self.changeBgSize = true; } } if ( ( self.options.zoomWindowWidth / self.widthRatio ) <= self.nzWidth ) { if ( self.options.zoomType != "inner" ) { if ( self.newvaluewidth > self.newvalueheight ) { self.currentZoomLevel = self.newvaluewidth; } } if ( self.options.zoomType != "lens" && self.options.zoomType != "inner" ) { self.changeBgSize = true; self.zoomLens.css( { width: String( ( self.options.zoomWindowWidth ) / self.widthRatio ) + 'px' } ) } if ( self.options.zoomType == "lens" || self.options.zoomType == "inner" ) { self.changeBgSize = true; } } if ( self.options.zoomType == "inner" ) { self.changeBgSize = true; if ( self.nzWidth > self.nzHeight ) { self.currentZoomLevel = self.newvaluewidth; } if ( self.nzHeight > self.nzWidth ) { self.currentZoomLevel = self.newvaluewidth; } } } //under //sets the boundry change, called in setWindowPos self.setPosition( self.currentLoc ); // }, closeAll: function () { if ( self.zoomWindow ) { self.zoomWindow.hide(); } if ( self.zoomLens ) { self.zoomLens.hide(); } if ( self.zoomTint ) { self.zoomTint.hide(); } }, changeState: function ( value ) { var self = this; if ( value == 'enable' ) { self.options.zoomEnabled = true; } if ( value == 'disable' ) { self.options.zoomEnabled = false; } } }; $.fn.elevateZoom = function ( options ) { return this.each( function () { var elevate = Object.create( ElevateZoom ); elevate.init( options, this ); $.data( this, 'elevateZoom', elevate ); } ); }; $.fn.elevateZoom.options = { zoomActivation: "hover", // Can also be click (PLACEHOLDER FOR NEXT VERSION) zoomEnabled: true, //false disables zoomwindow from showing preloading: 1, //by default, load all the images, if 0, then only load images after activated (PLACEHOLDER FOR NEXT VERSION) zoomLevel: 1, //default zoom level of image scrollZoom: false, //allow zoom on mousewheel, true to activate scrollZoomIncrement: 0.1, //steps of the scrollzoom minZoomLevel: false, maxZoomLevel: false, easing: false, easingAmount: 12, lensSize: 200, zoomWindowWidth: 400, zoomWindowHeight: 400, zoomWindowOffetx: 0, zoomWindowOffety: 0, zoomWindowPosition: 1, zoomWindowBgColour: "#fff", lensFadeIn: false, lensFadeOut: false, debug: false, zoomWindowFadeIn: false, zoomWindowFadeOut: false, zoomWindowAlwaysShow: false, zoomTintFadeIn: false, zoomTintFadeOut: false, borderSize: 4, showLens: true, borderColour: "#888", lensBorderSize: 1, lensBorderColour: "#000", lensShape: "square", //can be "round" zoomType: "window", //window is default, also "lens" available - containLensZoom: false, lensColour: "white", //colour of the lens background lensOpacity: 0.4, //opacity of the lens lenszoom: false, tint: false, //enable the tinting tintColour: "#333", //default tint color, can be anything, red, #ccc, rgb(0,0,0) tintOpacity: 0.4, //opacity of the tint gallery: false, galleryActiveClass: "zoomGalleryActive", imageCrossfade: false, constrainType: false, //width or height constrainSize: false, //in pixels the dimensions you want to constrain on loadingIcon: false, //http://www.example.com/spinner.gif cursor: "default", // user should set to what they want the cursor as, if they have set a click function responsive: true, onComplete: $.noop, onDestroy: function () {}, onZoomedImageLoaded: function () {}, onImageSwap: $.noop, onImageSwapComplete: $.noop }; } )( jQuery, window, document ); // source --> https://nexoinmobiliaria.com.pe/wp-content/plugins/ecommerce-product-catalog/js/colorbox/jquery.colorbox-min.js?ver=5.0.2 /*! Colorbox 1.6.3 license: MIT http://www.jacklmoore.com/colorbox */ (function(t,e,i){function n(i,n,o){var r=e.createElement(i);return n&&(r.id=Z+n),o&&(r.style.cssText=o),t(r)}function o(){return i.innerHeight?i.innerHeight:t(i).height()}function r(e,i){i!==Object(i)&&(i={}),this.cache={},this.el=e,this.value=function(e){var n;return void 0===this.cache[e]&&(n=t(this.el).attr("data-cbox-"+e),void 0!==n?this.cache[e]=n:void 0!==i[e]?this.cache[e]=i[e]:void 0!==X[e]&&(this.cache[e]=X[e])),this.cache[e]},this.get=function(e){var i=this.value(e);return t.isFunction(i)?i.call(this.el,this):i}}function h(t){var e=W.length,i=(A+t)%e;return 0>i?e+i:i}function a(t,e){return Math.round((/%/.test(t)?("x"===e?E.width():o())/100:1)*parseInt(t,10))}function s(t,e){return t.get("photo")||t.get("photoRegex").test(e)}function l(t,e){return t.get("retinaUrl")&&i.devicePixelRatio>1?e.replace(t.get("photoRegex"),t.get("retinaSuffix")):e}function d(t){"contains"in x[0]&&!x[0].contains(t.target)&&t.target!==v[0]&&(t.stopPropagation(),x.focus())}function c(t){c.str!==t&&(x.add(v).removeClass(c.str).addClass(t),c.str=t)}function g(e){A=0,e&&e!==!1&&"nofollow"!==e?(W=t("."+te).filter(function(){var i=t.data(this,Y),n=new r(this,i);return n.get("rel")===e}),A=W.index(_.el),-1===A&&(W=W.add(_.el),A=W.length-1)):W=t(_.el)}function u(i){t(e).trigger(i),ae.triggerHandler(i)}function f(i){var o;if(!G){if(o=t(i).data(Y),_=new r(i,o),g(_.get("rel")),!$){$=q=!0,c(_.get("className")),x.css({visibility:"hidden",display:"block",opacity:""}),I=n(se,"LoadedContent","width:0; height:0; overflow:hidden; visibility:hidden"),b.css({width:"",height:""}).append(I),j=T.height()+k.height()+b.outerHeight(!0)-b.height(),D=C.width()+H.width()+b.outerWidth(!0)-b.width(),N=I.outerHeight(!0),z=I.outerWidth(!0);var h=a(_.get("initialWidth"),"x"),s=a(_.get("initialHeight"),"y"),l=_.get("maxWidth"),f=_.get("maxHeight");_.w=Math.max((l!==!1?Math.min(h,a(l,"x")):h)-z-D,0),_.h=Math.max((f!==!1?Math.min(s,a(f,"y")):s)-N-j,0),I.css({width:"",height:_.h}),J.position(),u(ee),_.get("onOpen"),O.add(F).hide(),x.focus(),_.get("trapFocus")&&e.addEventListener&&(e.addEventListener("focus",d,!0),ae.one(re,function(){e.removeEventListener("focus",d,!0)})),_.get("returnFocus")&&ae.one(re,function(){t(_.el).focus()})}var p=parseFloat(_.get("opacity"));v.css({opacity:p===p?p:"",cursor:_.get("overlayClose")?"pointer":"",visibility:"visible"}).show(),_.get("closeButton")?B.html(_.get("close")).appendTo(b):B.appendTo("
"),w()}}function p(){x||(V=!1,E=t(i),x=n(se).attr({id:Y,"class":t.support.opacity===!1?Z+"IE":"",role:"dialog",tabindex:"-1"}).hide(),v=n(se,"Overlay").hide(),L=t([n(se,"LoadingOverlay")[0],n(se,"LoadingGraphic")[0]]),y=n(se,"Wrapper"),b=n(se,"Content").append(F=n(se,"Title"),R=n(se,"Current"),P=t('